<template>
  <div class="main-content">
    完成发布!
  </div>
</template>

<script>
  import subject from "../../../../../api/subject";

  export default {
    name: "Success",
    mounted() {
      this.publishSubject() //将课程变为已发布状态
    },
    methods:{
      publishSubject(){
        subject.publishInfo(this.$store.state.subjectId)
          .then(() => {
            this.$message.info('课程发布成功')
          })
      }
    }
  }
</script>

<style scoped>
  .main-content{
    margin: 24px auto;
  }
</style>
